# -*- coding: utf-8 -*-
from application import app

from flask_debugtoolbar import DebugToolbarExtension

#
# toolbar = DebugToolbarExtension(app)

'''
拦截器处理 和 错误处理器
'''
from interceptors.Auth import *
from interceptors.errorHandler import *

'''
蓝图
'''
from controllers.index import index_page
from controllers.member import member_page

from controllers.person import person_page
from controllers.bpm import bpm_page
from controllers.check import check_page
from controllers.upload import upload_page
from controllers.seal import seal_page
from controllers.thing import thing_page
from controllers.meeting import meeting_page
from controllers.mail import mail_page
from controllers.evaluate import evaluate_page


app.register_blueprint(index_page, url_prefix="/")
app.register_blueprint(member_page, url_prefix="/member")
app.register_blueprint(person_page, url_prefix="/person")
app.register_blueprint(bpm_page, url_prefix="/bpm")
app.register_blueprint(check_page, url_prefix="/check")
app.register_blueprint(upload_page, url_prefix="/upload")
app.register_blueprint(seal_page, url_prefix="/seal")
app.register_blueprint(thing_page, url_prefix="/thing")
app.register_blueprint(meeting_page, url_prefix="/meeting")
app.register_blueprint(mail_page, url_prefix="/mail")
app.register_blueprint(evaluate_page, url_prefix="/evaluate")

'''
模板函数
'''
from common.libs.UrlManager import UrlManager

app.add_template_global(UrlManager.buildStaticUrl, 'buildStaticUrl')
app.add_template_global(UrlManager.buildUrl, 'buildUrl')


from pyecharts.datasets import register_files

register_files({"guanzhuoran": ["themes/guanzhuoran", "js"]})